const base = require('./webpack.base.js');
const HtmlWebpackPlugin = require('html-webpack-plugin');

const plugins = [
	new HtmlWebpackPlugin({
		title: 'Custom template',
		filename: '../../public/views/index.html', //生成的html存放路径，相对于 path
		template: './platforms/config/index.tpl.html', //html模板路径
		inject: true
	})
];

const entry = {
	bundle: [
		'./platforms/browser'		
	],
	vendor: [
		'react',
		'react-dom',
		'react-router',
	]
};

const config = Object.assign({}, base, {
	devtool: "eval",
	entry: entry,
	plugins: (base.plugins || []).concat(plugins)
});

module.exports = config;